package com.test.java;

import java.util.Scanner;

/**
 * 本题要求你写个程序把给定的符号打印成沙漏的形状。
 * =============================================================
 * Version          Author          Date            Description
 * 1.0              白建         2017/12/26             创建
 * =============================================================
 */
public class Java_18
{

    public static void main(String[] args)
    {

        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int level = (int) Math.sqrt((n + 1) / 2);

        char meta = scanner.nextLine().charAt(1);

        for (int i = level; i > 0; i--)
        {
            for (int k = 0; k < level - i; k++)
            {
                System.out.print(" ");
            }
            for (int j = 0; j < 2 * (i - 1) + 1; j++)
            {
                System.out.print(meta);
            }
            System.out.print("\n");
        }

        for (int i = 2; i <= level; i++)
        {
            for (int k = 0; k < level - i; k++)
            {
                System.out.print(" ");
            }
            for (int j = 0; j < 2 * (i - 1) + 1; j++)
            {
                System.out.print(meta);
            }
            System.out.print("\n");
        }
        System.out.print((int) (n - (2 * Math.pow(level, 2) - 1)));
    }
}
